package p1;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class TraceHandler implements InvocationHandler {

	Object target ;
	public TraceHandler(Object t){
		target = t;
	}
	
	
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		
		// do some before...
		System.out.println("before.d..");
		
		Object result = method.invoke(target,args);
		System.out.println("proxy result :" +result);
		
		return result ;
		
	}

}
